package io.kerns.boot.web.validate.Group;

/**
 * @author xiaohei
 * @create 2020-12-29 上午10:41
 *
 *
 * ps ：在类上面添加分组
 * public class SaveRoleDTO implements Serializable {
 *     @ApiModelProperty("角色名称")
 *     @NotBlank(
 *         message = "角色名称不能为空",
 *         groups = {AddGroup.class}
 *     )
 *     private String roleName;
 * }
 *
 * 在 controller 上面添加组参数交易
 * @Api(tags = "角色 - API")
 * @RestController
 * @RequestMapping("/api/v1/role")
 * public class JczdRoleController {
 *
 *     @Autowired
 *     private IJczdRoleService roleService;
 *     @ApiOperation(value = "新增角色")
 *     @PostMapping(value = "saveRole")
 *     public Response saveRole(@Validated({ClientGroup.class}) @RequestBody SaveRoleDTO saveRoleDTO) {
 *         saveRoleDTO.setTenantId(RequestContext.getTenantId());
 *         if(roleService.saveRole(saveRoleDTO,true)) return ResponseUtils.success();
 *         return ResponseUtils.fail("保存失败");
 *     }
 * }
 **/
public interface AddGroup {
}
